package com.deep.transaction.demo12.controller;

import com.deep.transaction.demo12.annotation.MyTransactionAnnotation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class TestController {

    @GetMapping("test_transaction")
    @MyTransactionAnnotation
    public String testTransaction(@RequestParam(value = "name") String name) {

        int i = 1 / 0;
        return name;

    }
}
